from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^bbs/', include('bbs.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT}),
)

urlpatterns += patterns('bbs.user_views',

    (r'^login/$', 'login'),
    (r'^logout/$', 'logout'),
    (r'^register/$', 'register'),
       
)

urlpatterns += patterns('bbs.forum.views',
    (r'^$', 'list_groups'),
    
    (r'^(?P<group>[-\w]+)/list_threads/$', 'list_threads'),
    (r'^(?P<group>[-\w]+)/add_thread/$', 'add_thread'),
    
    (r'^append_thread/(?P<thread_id>\d+)/$', 'append_thread'), 
    (r'^details_thread/(?P<thread_id>\d+)/$', 'details_thread'), 
      
)
